<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="${package.Mapper}.${table.mapperName}">
    <sql id="Base_Column_List">
<#list table.commonFields as field>
        ${field.columnName},
</#list>
        ${table.fieldNames}
    </sql>
    <sql id="Base_Where">

    </sql>
<#if "true" == cfg.createPage>

    <select id="query${entity}Page" resultType="com.han.fu.api.business.model.vo.${entity}Vo">
        SELECT <include refid="Base_Column_List" /> FROM ${table.name} WHERE is_deleted = 0
        <include refid="Base_Where" />
        ORDER BY update_time DESC
    </select>
</#if>
<#if "true" == cfg.createStats>

    <select id="query${entity}Stats" resultType="com.han.fu.api.business.model.vo.${entity}StatsVo">
        SELECT <include refid="Base_Column_List" /> FROM ${table.name} WHERE is_deleted = 0
        ORDER BY update_time DESC
    </select>
</#if>

</mapper>